package com.shujia.car.batch

import java.io.InputStream
import java.util.Properties
import scala.io.Source

object IndexKJUTIL {

  //获取resources目录下文件的输入流
  val inputStream: InputStream = this
    .getClass //获取类对象
    .getClassLoader // Huoquy类类加载器
    .getResourceAsStream("kj.properties") // 获取文件输入流


  //创建配置文件对象
  val properties = new Properties()

  //加载配置
  properties.load(inputStream)

  //通过指标名获取指标口径
  def getIndexKJ(indexName: String): List[String] = {
    properties
      .getProperty(indexName)
      .split(",")
      .toList
  }

  def main(args: Array[String]): Unit = {
    println(getIndexKJ("zjjs"))
  }

}
